package com.xmall.sys.define.request.user;

import com.xmall.define.base.BaseUpdateRequest;
import com.xmall.validate.group.AddGroup;
import com.xmall.validate.group.UpdateGroup;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * 请求数据格式：新增/编辑 sys - user
 */
@Data
public class UserUpdateRequest extends BaseUpdateRequest implements Serializable {

    /**
     * 昵称
     */
    @NotBlank(message = "姓名不能为空", groups = { AddGroup.class, UpdateGroup.class })
    @Size(min = 2, max = 20, message = "姓名长度必须在 2 到 20 之间", groups = { AddGroup.class, UpdateGroup.class })
    private String nickname;

    /**
     * 账号
     */
    private String account;
}
